package com.service.business.notify.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.service.dao.model.NotifyMessage;

public interface NotifyMessageService extends IService<NotifyMessage> {

    /**
     * 根据消息类型统计用户未读消息数
     * @param memberId
     * @return
     */
    Integer countNotReadByMemberIdAndType(Integer memberId,Integer messageType);

    /**
     * 当前用户某种消息全部已读
     * @param memberId
     * @param messageType
     * @return
     */
    boolean readAllByMemberIdAndType(Integer memberId,Integer messageType);

    /**
     * 具体某个用户的某条消息已读
     * @param memberId
     * @param messageType
     * @param targetId
     * @return
     */
    boolean readByMemberAndTypeAndTarget(Integer memberId, Integer messageType, Integer targetId);
}
